Returns or sets a value that indicates or changes the approximate location of the current row in the rdoResultset object based on a percentage of the rows in the rdoResultset.
Syntax
object.PercentPosition [= value]
The PercentPosition property syntax has these parts:
Part | Description |
object | An object expression that evaluates to an object in the Applies To list. |
value | A number between 0.0 and 100.00. (Data type is Single) |
Remarks
To indicate or change the approximate position of the current row in an rdoResultset, you can check or set the PercentPosition property. Before you set or check the PercentPosition property, populate the rdoResultset by moving to the last row. If you use the PercentPosition property before fully populating the rdoResultset, the amount of movement is relative to the number of rows accessed — as indicated by the RowCount property. You can move to the last row and populate the rdoResultset using the MoveLast method.
Note Using the PercentPosition property to move the current row to a specific row in an rdoResultset isn't recommended — the Bookmark property or AbsolutePosition property is better suited for this task.
Once you set the PercentPosition property to a value, the row at the approximate position corresponding to that value becomes current, and the PercentPosition property is reset to a value that reflects the approximate position of the current row. For example, if your rdoResultset contains only five rows, and you set its PercentPosition value to 77, the value returned from the PercentPosition property might be 80, not 77.
You can use the PercentPosition property with a scroll bar on a Form or TextBox to indicate the location of the current row in an rdoResultset.
The PercentPosition property is not supported by all cursor types and driver combinations. For example, this property applies only to keyset-type and dynamic-type rdoResultset objects. If the setting is not supported, the PercentPosition property returns 50. If the position cannot be set, no movement occurs.